<template>
  <div>
    <!-- 推荐列表 -->
    <div class="Sentiment_list">
      <div
        class="Sentiment_item"
        v-for="(item,index) in GoodsList"
        :key="index"
        v-show="item.id>99756"
        @click="goto('/details',item)"
      >
        <img style="width:100%;height:200px" :src="item.pic" alt />
        <div class="van-ellipsis">{{item.name}}</div>
        <div class="van-ellipsis" style="font-size:10px">{{item.characteristic}}</div>
        <p style="color:red">￥{{item.minPrice}}</p>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  computed: {
    GoodsList: function () {
      return this.$store.state.GoodsList;
    },
  },
  methods: {
    goto(path, cid) {
      this.$router.push({
        path,
      });
      // console.log(cid);
      this.$store.dispatch("GOTOITEM", cid);
    },
  },
};
</script>

<style scoped>
.Sentiment_list {
  width: 100%;
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  font-size: 16px;
}
.Sentiment_item {
  width: 45%;
}
.Sentiment_item p {
  margin: 10px 0px;
}
</style>